package com.wf.classRoomTest;

import java.io.*;
import java.io.File;

/**
 * @author mpk
 * @since 2024/6/5 16:58:54
 */
public class FileTest {


    public static void main(String[] args) throws IOException {

        String path="E:\\Java\\JavaSE\\code\\src\\com\\wf\\a.txt";


        File file = new File(path);

        System.out.println(file.length());


        try (FileOutputStream fileOutputStream = new FileOutputStream(path);
               FileInputStream fileInputStream = new FileInputStream(path)
               )
       {

           String s =" aaaa";
           byte[] bytes = s.getBytes();
           fileOutputStream.write(bytes);

           System.out.println(fileInputStream.read());

       }







    }


}
